package com.ruoyi.lm.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lm.mapper.LmUserwithdrawMapper;
import com.ruoyi.lm.domain.LmUserwithdraw;
import com.ruoyi.lm.service.ILmUserwithdrawService;
import com.ruoyi.common.core.text.Convert;

/**
 * 用户提现记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-02
 */
@Service
public class LmUserwithdrawServiceImpl implements ILmUserwithdrawService 
{
    @Autowired
    private LmUserwithdrawMapper lmUserwithdrawMapper;

    /**
     * 查询用户提现记录
     * 
     * @param id 用户提现记录ID
     * @return 用户提现记录
     */
    @Override
    public LmUserwithdraw selectLmUserwithdrawById(String id)
    {
        return lmUserwithdrawMapper.selectLmUserwithdrawById(id);
    }

    /**
     * 查询用户提现记录列表
     * 
     * @param lmUserwithdraw 用户提现记录
     * @return 用户提现记录
     */
    @Override
    public List<LmUserwithdraw> selectLmUserwithdrawList(LmUserwithdraw lmUserwithdraw)
    {
        return lmUserwithdrawMapper.selectLmUserwithdrawList(lmUserwithdraw);
    }

    /**
     * 新增用户提现记录
     * 
     * @param lmUserwithdraw 用户提现记录
     * @return 结果
     */
    @Override
    public int insertLmUserwithdraw(LmUserwithdraw lmUserwithdraw)
    {
        lmUserwithdraw.setCreateTime(DateUtils.getNowDate());
        return lmUserwithdrawMapper.insertLmUserwithdraw(lmUserwithdraw);
    }

    /**
     * 修改用户提现记录
     * 
     * @param lmUserwithdraw 用户提现记录
     * @return 结果
     */
    @Override
    public int updateLmUserwithdraw(LmUserwithdraw lmUserwithdraw)
    {
        return lmUserwithdrawMapper.updateLmUserwithdraw(lmUserwithdraw);
    }

    /**
     * 删除用户提现记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteLmUserwithdrawByIds(String ids)
    {
        return lmUserwithdrawMapper.deleteLmUserwithdrawByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户提现记录信息
     * 
     * @param id 用户提现记录ID
     * @return 结果
     */
    @Override
    public int deleteLmUserwithdrawById(String id)
    {
        return lmUserwithdrawMapper.deleteLmUserwithdrawById(id);
    }
}
